-- GENERATED SPELL FOR [Vladof the Butcher] --


function spell0_30022(pUnit, Event) --@Blood Boil,Self--
pUnit:FullCastSpellOnTarget(55974,pUnit)
pUnit:RegisterEvent('Sorts_30022', 0, 1)
end

function spell1_30022(pUnit, Event) --@Blood Plague,n/a--
pUnit:FullCastSpellOnTarget(55973,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30022', 12000, 1)
end

function spell2_30022(pUnit, Event) --@Blood Presence,Self--
pUnit:FullCastSpellOnTarget(50689,pUnit)
pUnit:RegisterEvent('Sorts_30022', 595, 1)
end

function spell3_30022(pUnit, Event) --@Hysteria,n/a--
pUnit:FullCastSpellOnTarget(55975,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30022', 8000, 1)
end

function spell4_30022(pUnit, Event) --@Spell Deflection,Self--
pUnit:FullCastSpellOnTarget(55976,pUnit)
pUnit:RegisterEvent('Sorts_30022', 7000, 1)
end

function spell5_30022(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(55977,pUnit)
pUnit:RegisterEvent('Sorts_30022', 601, 1)
end

function Sorts_30022(pUnit, Event)
local choix_sorts_30022 = math.random(0, 5)
if choix_sorts_30022 == 0 then
pUnit:RegisterEvent('spell0_30022', 1, 1)
end
if choix_sorts_30022 == 1 then
pUnit:RegisterEvent('spell1_30022', 1, 1)
end
if choix_sorts_30022 == 2 then
pUnit:RegisterEvent('spell2_30022', 1, 1)
end
if choix_sorts_30022 == 3 then
pUnit:RegisterEvent('spell3_30022', 1, 1)
end
if choix_sorts_30022 == 4 then
pUnit:RegisterEvent('spell4_30022', 1, 1)
end
if choix_sorts_30022 == 5 then
pUnit:RegisterEvent('spell5_30022', 1, 1)
end
end

function mob30022_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30022', math.random(1500, 3000), 1)
end

function mob30022_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30022_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30022_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30022, 1, 'mob30022_Action')
RegisterUnitEvent(30022, 2, 'mob30022_Leave')
RegisterUnitEvent(30022, 3, 'mob30022_Kill')
RegisterUnitEvent(30022, 4, 'mob30022_Die')
